﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Detail.aspx.vb" Inherits="Lens.Detail" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style2
        {
            font-family: "Segoe UI";
            font-size: large;
        }
        .style3
        {
            font-family: "Segoe UI";
            font-size: medium;
        }
        .style5
        {
            font-size: x-large;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p class="style2">
        <strong><span class="style5">Photo Detail&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<asp:Button 
            ID="Button3" runat="server" Text="View Your Profile" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>
<p class="style2">
        &nbsp;&nbsp;&nbsp;
        <asp:Button ID="btn_like" runat="server" Text="Like!" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p class="style2">
        &nbsp;&nbsp;&nbsp;
        <asp:Label ID="lbl_like" runat="server" Text="You like this Photo"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</p>
    <p>
        <br />
        <asp:SqlDataSource ID="lensdetailSqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:lensPicConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:lensPicConnectionString.ProviderName %>" 
            SelectCommand="SELECT [PictureTitle], [Location], [Description], [NameOfUploader], [CameraUsed], [Picture] FROM [lenspic] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="lensdetailSqlDataSource1" Width="913px" AllowSorting="True">
            <Columns>
                <asp:BoundField DataField="PictureTitle" HeaderText="Photo Title" 
                    SortExpression="PictureTitle" >
                <HeaderStyle BackColor="Black" ForeColor="White" HorizontalAlign="Center" 
                    VerticalAlign="Middle" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:HyperLinkField DataNavigateUrlFields="Location" 
                    DataNavigateUrlFormatString="http://en.wikipedia.org/wiki/{0}" 
                    DataTextField="Location" HeaderText="Location">
                <HeaderStyle BackColor="Black" ForeColor="White" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:HyperLinkField>
                <asp:BoundField DataField="Description" HeaderText="Description" 
                    SortExpression="Description" >
                <HeaderStyle BackColor="Black" ForeColor="White" HorizontalAlign="Center" 
                    VerticalAlign="Middle" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:HyperLinkField DataNavigateUrlFields="NameOfUploader" 
                    DataNavigateUrlFormatString="Profile.aspx?TravellerName={0}" 
                    DataTextField="NameOfUploader" HeaderText="Uploader">
                <HeaderStyle BackColor="Black" ForeColor="White" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:HyperLinkField>
                <asp:HyperLinkField DataNavigateUrlFields="CameraUsed" 
                    DataNavigateUrlFormatString="http://www.amazon.co.uk/s/ref=nb_sb_noss?url=search-alias%3Daps&amp;field-keywords={0}" 
                    DataTextField="CameraUsed" HeaderText="Camera Used">
                <HeaderStyle BackColor="Black" ForeColor="White" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:HyperLinkField>
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Photo">
                    <ControlStyle CssClass="uploadedDetailPicture" />
                    <HeaderStyle BackColor="Black" ForeColor="White" HorizontalAlign="Center" 
                        VerticalAlign="Middle" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:ImageField>
            </Columns>
        </asp:GridView>
    <p>
    </p>
        <asp:SqlDataSource ID="commentsSqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:lensPicConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:lensPicConnectionString.ProviderName %>" 
            SelectCommand="SELECT [Author], [Comment], [Title] FROM [Comments] WHERE ([PictureID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="PictureID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>

        &nbsp;<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>

   <asp:Rating  BorderWidth="1" BorderStyle="None"
    width="200" 
    Height="40" 
    ID="Rating1" 
    runat="server" 
    StarCssClass="ratingStar" 
    WaitingStarCssClass="savedRatingStar" 
    EmptyStarCssClass="emptyRatingStar" 
    filledStarCssClass="filledRatingStar"
    MaxRating="5" 
    >
    </asp:Rating>
        &nbsp;How good is this 
        Photo?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
        <asp:Button ID="btn_SaveRating" runat="server" Text="Save Rating" Width="86px" 
            Height="22px" />
&nbsp;<asp:Label ID="lbl_ratingFeedBack" runat="server"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="lbl_tagLocFeed" runat="server"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="lbl_regTagFeed" runat="server"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<p class="style2">
    &nbsp;&nbsp; Tag Location&nbsp;&nbsp; <asp:DropDownList 
            ID="ddl_pictureTag" runat="server" DataSourceID="tagsSqlDataSource1" 
            DataTextField="Tag" DataValueField="ID" Height="24px" Width="151px">
        </asp:DropDownList>
    &nbsp;<asp:Button ID="btn_setTag" runat="server" Height="29px" Text="Set Tag" 
            Width="110px" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tag Region&nbsp;&nbsp;
    <asp:DropDownList ID="ddl_tagRegion" runat="server" 
        DataSourceID="tagRegSqlDataSource1" DataTextField="TagRegion" 
        DataValueField="ID" Height="20px" Width="159px">
    </asp:DropDownList>
    <asp:Button ID="btn_setTag0" runat="server" Height="29px" Text="Set Tag" 
            Width="110px" />
        &nbsp;<asp:SqlDataSource ID="tagsSqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:lensPicConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:lensPicConnectionString.ProviderName %>" 
            
        SelectCommand="SELECT [ID], [Tag] FROM [Tags] ORDER BY [Tag]">
        </asp:SqlDataSource>
    <asp:SqlDataSource ID="tagRegSqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:lensPicConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:lensPicConnectionString.ProviderName %>" 
        SelectCommand="SELECT [ID], [TagRegion] FROM [TagRegion] ORDER BY [TagRegion]">
    </asp:SqlDataSource>
&nbsp;</p>
    <p class="style2">
        <strong>Add Your Comment</strong>&nbsp;
        <asp:LoginName ID="LoginName1" runat="server" />
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataSourceID="commentsSqlDataSource1" Height="16px" Width="922px">
            <Columns>
                <asp:TemplateField HeaderText="Comments">
                              
                    <ItemTemplate>

                     <div style = "background-color:Silver">
                     <span>
                        <b><%# Eval("Title") %></b><br /></span>
                        <%# Eval("Author") %><br />
                         <%# Eval("Comment") %><br />
                        </div>

                </ItemTemplate>

                <AlternatingItemTemplate>

                    <div style = "background-color:White">
                     <span>
                    <b><%# Eval("Title") %></b><br /></span>
                     <%# Eval("Author") %><br />
                     <%# Eval("Comment") %><br />
               </div>
                
                </AlternatingItemTemplate>           
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </p>
    <p class="style3">
        Title</p>
    <p>
    &nbsp;<asp:TextBox ID="tb_Title" runat="server" Width="469px"></asp:TextBox>
        &nbsp;&nbsp;
        </p>
    <p class="style3">
        Your Comment</p>
    <p>
        <asp:TextBox ID="tb_Comment" runat="server" Height="182px" TextMode="MultiLine" 
            Width="469px"></asp:TextBox>
    &nbsp;&nbsp;&nbsp;&nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Post Comment" Width="183px" />
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
    </p>
</asp:Content>
